package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.po.YgSkuMaterial;
import com.ygqh.baby.po.YgSkuMaterialExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface YgSkuMaterialMapper {
    int countByExample(YgSkuMaterialExample example);

    int deleteByExample(YgSkuMaterialExample example);

    int deleteByPrimaryKey(Long id);

    int insert(YgSkuMaterial record);

    int insertSelective(YgSkuMaterial record);

    List<YgSkuMaterial> selectByExample(YgSkuMaterialExample example);

    YgSkuMaterial selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") YgSkuMaterial record, @Param("example") YgSkuMaterialExample example);

    int updateByExample(@Param("record") YgSkuMaterial record, @Param("example") YgSkuMaterialExample example);

    int updateByPrimaryKeySelective(YgSkuMaterial record);

    int updateByPrimaryKey(YgSkuMaterial record);

    int countSuper(@Param("productCode") String productCode, @Param("skuCode") String skuCode, @Param("productName") String productName, @Param("barCode") String barCode);

    List<YgSkuMaterial> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("productCode") String productCode, @Param("skuCode") String skuCode, @Param("productName") String productName, @Param("barCode") String barCode);

    List<YgSkuMaterial> selectSkuByProductId(@Param("productCode") String productCode);

    void updateSkuCostByList(@Param("skus") List<YgSkuMaterial> skus);

    YgSkuMaterial selectSkuByBarCode(@Param("barCode") String barCode);

    void updateBatchSkuMaterial(@Param("ygSkuMaterials") List<YgSkuMaterial> ygSkuMaterial);

    List<YgSkuMaterial> findSkuByBarCodes(@Param("barCodes") List<String> barCodes);

    YgSkuMaterial selectBySkuCode(@Param("skuCode") String skuCode);

    void saveBatchSkuCost(@Param("ygSkuMaterials") List<YgSkuMaterial> ygSkuMaterials);

    List<YgSkuMaterial> selectListBySkuCode(@Param("list") List<String> skuCodeList);

    int updateCostPriceBatch(@Param("costList") List<YgSkuMaterial> costList, @Param("updateBy") String updateBy, @Param("updateTime") Date updateTime);

    int updateBarcodeBatch(@Param("list") List<YgSkuMaterial> list, @Param("updateBy") String updateBy, @Param("updateTime") Date updateTime);
}



